<?php
try
{
// Import database util script once to get the properties and getConnection() function
require_once 'databaseUtil.php';
$stConn = getConnection();
$insert_sql="insert into videocomments values($_POST[videoid],'$_POST[cname]','$_POST[comment]')";
// Result set for query
$comments = mysql_query($insert_sql,$stConn);
closeConnection($stConn);
}catch(Exception $dbEX)
{
closeConnection($stConn);
}

// Redirect back to videos page after posting comment...
header( 'Location: videos.php') ;

?> 


